25-Nested Loop Example.py


Sign up Free. Don't forget to check out our challenges, lessons, solve and learn series and more ...


Code Snippet


#first create your list of pets
listofpets=["goose","moose","dog","pigeon"]

#***NESTED LOOP***************
for i in listofpets:
        for x in i:
            print(x)
            
    
                    

Try it yourself